Create Mobile Games with Corona (for HUDA ADEL ALANAZI) by Silvia Domenech

Create Mobile Games with Corona (for HUDA ADEL ALANAZI) by Silvia Domenech

Author:Silvia Domenech
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
ISBN: 978-1-937785-57-4
Publisher: The Pragmatic Bookshelf, LLC (466510)


​ powerups[ i ]:removeMe( )

​ removeTableRows( powerups, i, 1 )

​ ​end​

​ ​end​

* * *

Figure 43.

That’s it—Galactic Warfare now has power-ups! Compile it, and you’ll see something like the figure shown here.

Ending the Game

Our gameplay still has one glaring omission: there’s no way to lose.

It’s time to fix that now. To cause the game to end once all of the players’ lives have been lost, add a check of the ​lives​ variable to see whether it’s greater than zero. Any positive number is good, but otherwise call Corona’s ​storyboard:gotoScene​ function to return the player to the main menu.

Shooting/game.lua

​ ​-- Check whether we have some lives left, and return to the menu if we don't​



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.